import Vue from 'vue';


const utils = {
	vueRequest(quest){
		Vue.http({
			method : quest.method || 'GET',
			url : quest.url + '&clientId=vistor_app',
			headers : {
				'Content-Type':'application/json;charset=utf-8',
			},
			body : quest.body || '',
			params: quest.params || '',
		}).then(res => {
			if(res.body.respCode == 0){
				quest.cb(res.body.result)
			}else{
				quest.err(res)
			}
		}).catch(err => {
			quest.err(err)
		})
	}
}
export default utils